package com.ute.chinesechess;
public class NguoiChoi {
	public int Phe;
    public Tuong qTuong = new Tuong();
    public Sy[] qSy = new Sy[2];
    public Tinh[] qTinh = new Tinh[2];
    public Xe[] qXe = new Xe[2];
    public Phao[] qPhao = new Phao[2];
    public Ma[] qMa = new Ma[2];
    public Tot[] qTot = new Tot[5];
    
    public NguoiChoi(int x)	//Khoi tao nguoi choi
    {
        if (x == 0)
        {
            qSy[0] = new Sy();
            qSy[1] = new Sy();
            qTinh[0] = new Tinh();
            qTinh[1] = new Tinh();
            qXe[0] = new Xe();
            qXe[1] = new Xe();
            qPhao[0] = new Phao();
            qPhao[1] = new Phao();
            qMa[0] = new Ma();
            qMa[1] = new Ma();
            qTot[0] = new Tot();
            qTot[1] = new Tot();
            qTot[2] = new Tot();
            qTot[3] = new Tot();
            qTot[4] = new Tot();

            Phe = 0;
            qTuong.KhoiTao(0, 4, "TUONG", 0, 0, true, true);
            qSy[0].KhoiTao(0, 3, "SY", 0, 0, true, true);
            qSy[1].KhoiTao(0, 5, "SY", 0, 1, true, true);
            qTinh[0].KhoiTao(0, 2, "TINH", 0, 0, true, true);
            qTinh[1].KhoiTao(0, 6, "TINH", 0, 1, true, true);
            qXe[0].KhoiTao(0, 0, "XE", 0, 0, true, true);
            qXe[1].KhoiTao(0, 8, "XE", 0, 1, true, true);
            qPhao[0].KhoiTao(2, 1, "PHAO", 0, 0, true, true);
            qPhao[1].KhoiTao(2, 7, "PHAO", 0, 1, true, true);
            qMa[0].KhoiTao(0, 1, "MA", 0, 0, true, true);
            qMa[1].KhoiTao(0, 7, "MA", 0, 1, true, true);
            qTot[0].KhoiTao(3, 0, "TOT", 0, 0, true, true);
            qTot[1].KhoiTao(3, 2, "TOT", 0, 1, true, true);
            qTot[2].KhoiTao(3, 4, "TOT", 0, 2, true, true);
            qTot[3].KhoiTao(3, 6, "TOT", 0, 3, true, true);
            qTot[4].KhoiTao(3, 8, "TOT", 0, 4, true, true);
        }
        else
        {
        	qSy[0] = new Sy();
            qSy[1] = new Sy();
            qTinh[0] = new Tinh();
            qTinh[1] = new Tinh();
            qXe[0] = new Xe();
            qXe[1] = new Xe();
            qPhao[0] = new Phao();
            qPhao[1] = new Phao();
            qMa[0] = new Ma();
            qMa[1] = new Ma();
            qTot[0] = new Tot();
            qTot[1] = new Tot();
            qTot[2] = new Tot();
            qTot[3] = new Tot();
            qTot[4] = new Tot();

            Phe = 1;
            qTuong.KhoiTao(9, 4, "TUONG", 1, 0, true, true);
            qSy[0].KhoiTao(9, 3, "SY", 1, 0, true, true);
            qSy[1].KhoiTao(9, 5, "SY", 1, 1, true, true);
            qTinh[0].KhoiTao(9, 2, "TINH", 1, 0, true, true);
            qTinh[1].KhoiTao(9, 6, "TINH", 1, 1, true, true);
            qXe[0].KhoiTao(9, 0, "XE", 1, 0, true, true);
            qXe[1].KhoiTao(9, 8, "XE", 1, 1, true, true);
            qPhao[0].KhoiTao(7, 1, "PHAO", 1, 0, true, true);
            qPhao[1].KhoiTao(7, 7, "PHAO", 1, 1, true, true);
            qMa[0].KhoiTao(9, 1, "MA", 1, 0, true, true);
            qMa[1].KhoiTao(9, 7, "MA", 1, 1, true, true);
            qTot[0].KhoiTao(6, 0, "TOT", 1, 0, true, true);
            qTot[1].KhoiTao(6, 2, "TOT", 1, 1, true, true);
            qTot[2].KhoiTao(6, 4, "TOT", 1, 2, true, true);
            qTot[3].KhoiTao(6, 6, "TOT", 1, 3, true, true);
            qTot[4].KhoiTao(6, 8, "TOT", 1, 4, true, true);
        }
    }

}
